{% extends "shared/layout.volt" %}
{% block content %}
    <h1 class="page-header">
        用户列表
        {% if Member.isPermission('Member','edit') %}
        <a href="{{ url("member/edit") }}" class="btn btn-default btn-sm pull-right"><i class="fa fa-user-plus"></i> 新增数据</a>
        {% endif %}
    </h1>
    <div class="table-responsive">
        <div class="search-container">
            <form class="form-inline">
                <div class="form-group">
                    <label class="control-label" for="search_field">用户搜索：</label>
                    <input type="text" class="form-control input-sm" id="keyword" name="keyword" style="width: 300px;" placeholder="用户账号/姓名/邮箱/手机号">
                </div>

                <div class="form-group">
                    <button type="submit" class="btn btn-success btn-sm">搜 索</button>
                </div>
            </form>
        </div>
        <table class="table-tidy">
            <thead class="table-tidy-head">
            <tr>
                <th style="width: 80px;">#</th>
                <th>用户账号</th>
                <th style="width: 180px;">真实姓名</th>
                <th style="width: 210px;">用户邮箱</th>
                <th style="width: 120px;">手机号</th>
                <th style="width: 180px;">创建时间</th>
                <th style="width: 120px;">用户状态</th>
                <th style="width: 80px;">操作</th>
            </tr>
            </thead>
            <tbody class="table-tidy-body">
            {% for member in Model.items %}
            <tr>
                <td>{{ member.member_id }}</td>
                <td>{{ member.account }}</td>
                <td>{{ member.realname }}</td>
                <td>{{ member.email }}</td>
                <td>{{ member.phone }}</td>
                <td>{{ member.create_time }}</td>
                <td>
                    <span class="label-yes"><i class="glyphicon glyphicon-ok-circle"></i> 启用</span>
                </td>
                <td>
                {% if Member.isPermission('Member','detail') %}
                    <a href="{{ url('member/detail') }}?member_id={{ member.member_id }}">查看</a>
                    {% endif %}
                    {% if Member.isPermission('Member','edit') %}
                        | <a href="{{ url('member/edit') }}?member_id={{ member.member_id }}" title="">编辑</a>
                    {% endif %}
                </td>
            </tr>
            {% else %}
                <tr>
                    <td class="text-center" colspan="8">暂无数据</td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
        <div class="page pagination">
            <?php echo $Model->getPaginate();?>
        </div>
    </div>
{% endblock %}